package cn.gxufe.reliable.message.common;

/**
 * @author yingjie.rong
 **/
public class Message implements java.io.Serializable{

    public final static String SOURCE_SERVICE_NAME = "SOURCE_SERVICE_NAME";
    /**
     * 上游服务，key 前缀
     */
    public final static String SOURCE_SERVICE_KEY_PREFIX ="U_";
    /**
     * 下游服务，key 前缀
     */
    public final static String TARGET_SERVICE_KEY_PREFIX ="D_";

    public final static int STATUS_PREPARE          = 1 << 1;
    public final static int STATUS_CONFIRM          = 1 << 2;
    public final static int STATUS_FINISH           = 1 << 3;
    public final static int STATUS_CANCEL           = 1 << 4;
    /**
     * 出现了数据不一致
     */
    public final static int STATUS_INCONSISTENT     = 1 << 5;
    /**
     * 出现了数据不一致
     */
    public static final Integer RESPONSE_CODE_INCONSISTENT = 307;
    public static final Integer RESPONSE_CODE_NOT_FOUNT = 404;
    public static final Integer RESPONSE_CODE_OK = 0;

    private String key;
    private String header;
    private String data;
    private Integer status = 0;
    private Long id;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getData() {
        return data;
    }
    public void setData(String data) {
        this.data = data;
    }

    public String getHeader() {
        return header;
    }

    public void setHeader(String header) {
        this.header = header;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

}
